#include <iostream>
#include "shape.h"
using namespace std;

void displayShape(Shape&);

int main()
{
	Shape myShape(3,6,7,10,6,3),myShape2(9,10,11,7,10,6),myShape3(4,3,7,5,8,2);

	cout << "Shape 1 vertices:" << endl;
	displayShape(myShape);
	cout << "Shape 2 vertices:" << endl;
	displayShape(myShape2);
	cout << "Shape 3 vertices:" << endl;
	displayShape(myShape3);
	cout << endl;

	//Test all combinations for the 3 triangles
	cout << "Shape 1 and 2: " << myShape.getCollision(myShape2) << endl;
	cout << "Shape 1 and 3: " << myShape.getCollision(myShape3) << endl;
	cout << "Shape 2 and 3: " << myShape2.getCollision(myShape3) << endl;
	cout << "Shape 2 and 1: " << myShape2.getCollision(myShape) << endl;
	cout << "Shape 3 and 1: " << myShape3.getCollision(myShape) << endl;
	cout << "Shape 3 and 2: " << myShape3.getCollision(myShape2) << endl << endl << endl;

	return 0;
}

void displayShape(Shape &s)
{
	for(int i=0;i<s.getVert();i++)
		cout << "(" << s.getX()[i] << " , " << s.getY()[i] << ")" << endl;
}